<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="template.xhtml">
    <f:metadata>
        <f:viewParam name="from" value="#{loginBean.from}" />
    </f:metadata>
    <ui:define name="content">
        <div class="container">
            <h:form id="loginForm">
                <h:panelGrid columns="1" cellpadding="5" style="margin: 0 auto; text-align: left">
                    <p:messages showIcon="true" globalOnly="true"/>
                    <p:inputText placeholder="Email" type="email" id="loginEmail" value="#{loginBean.username}"
                                 required="true" style="width:272px"/>
                    <p:password style="width:272px" id="loginPassword" placeholder="Password"
                                value="#{loginBean.password}"
                                required="true"/>
                    <h:outputLink value="/password_reminder.xhtml">Forgot your password?</h:outputLink>
                    <p:commandButton value="Login" action="#{loginBean.doLogin()}" update="loginForm"/>
                    <p:column></p:column>
                    <h:panelGroup>
                        Not a member? <h:outputLink value="/newuser.xhtml">Join now!</h:outputLink>
                    </h:panelGroup>
                </h:panelGrid>
            </h:form>
        </div>
    </ui:define>
</ui:composition>
</html>